<?
include '../includes/specs_functions.php';

#----------------------------------------------------
# Connect to PADS
$DB = getDB();



$specId = $_GET['specId'];

echo "
	<?xml version=\"1.0\" encoding=\"utf-8\"?>
		<spec>
			<config>
				<baseUrl>http://beta.xivpads.com/specs/dev/</baseUrl>
				<jobs>";

	$table = SPEC_TBL_JOBS." as job";
	$col = array(
			"job.".SPEC_TBL_JOBS_ID." as id"
			,"job.".SPEC_TBL_JOBS_TRI." as tri"
			,"job.".SPEC_TBL_JOBS_NAME." as name"
			);
	$orderBy = "job.".SPEC_TBL_JOBS_NAME;
	$direction = "ASC";
	
	$result = $DB->GetData($table ,$col ,true ,null, $orderBy, $direction);

	foreach ($result[3] as $row) {

			echo "	
				<job>
					<id>".$row['id']."</id>
					<tri>".$row['tri']."</tri>
					<name>".$row['name']."</name>
				</job>";
	}
	
	echo  "</jobs>
		</config>
	</spec>";
#------------------------------------------------------------------------
# Disconnect
leaveDB($DB);


?>